'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 锻造
 * @author sundbcn@gmail.com (sun debing)
 */

var _ = require('lodash');
var equipConf = require('../config/equipConf');
var gemstoneConf = require('../config/gemstoneConf');

/**
 * 获取锻造装备
 * @param {[type]} battle_list [description]
 */
exports.getForgeEquip = function (job_type, forge_quality, forge_part) {
    var forge_equip_list = equipConf.getRandomForgeEquip(job_type, forge_quality, forge_part);
    var gen_random = _.random(0, forge_equip_list.length - 1);
    return forge_equip_list[gen_random];
};

/**
 * 获取锻造宝石
 * @param {[type]} battle_list [description]
 */
exports.getForgeGemstone = function (forge_lvl) {
    var forge_gemstone_list = gemstoneConf.getRandomForgeGemstone(forge_lvl);
    var gen_random = _.random(0, forge_gemstone_list.length - 1);
    return forge_gemstone_list[gen_random];
};
